package com.crape.faq.dao;

import java.util.List;

import com.crape.common.exceptions.DAOException;
import com.crape.common.model.Question;

public interface IQuestionDAO {
	
	List<Question> searchQuestions(String searchValue, Integer startIndex, Integer pageSize) throws DAOException;

	Long countSearchQuestions(String searchValue) throws DAOException;

	List<Question> listQuestions(Question Question) throws DAOException;

	Long countQuestions(Question Question) throws DAOException;

	List<Question> getPagedQuestions(Integer startIndex, Integer pageSize) throws DAOException;

	List<Question> getPagedQuestionsByAccountid(Long accountid, Integer startIndex, Integer pageSize) throws DAOException;

	List<Question> getOther10Questions(Long questionid) throws DAOException;

	List<Question> getHotQuestions() throws DAOException;

	Long countAnswerQuestionsByAccountid(Long accountid) throws DAOException;

	List<Question> getPagedAnswerQuestionsByAccountid(Long accountid, Integer startIndex, Integer pageSize) throws DAOException;

	Long countFollowedQuestionsByAccountid(Long accountid) throws DAOException;

	List<Question> getPagedFollowedQuestionsByAccountid(Long accountid, Integer startIndex, Integer pageSize) throws DAOException;

	void insertQuestion(Question Question) throws DAOException;

	void updateQuestion(Question Question) throws DAOException;

	void updateQuestionAnswers(Long id, Long num) throws DAOException;

	void updateQuestionAttentions(Long id, Long num) throws DAOException;

	void deleteQuestionById(Long id) throws DAOException;

}
